#ifndef __HAL_H__
#define __HAL_H__

//定义pid state等类型
#define PID_TYPE int
//#define PSTATE_TYPE int
#define PSTATUS_TYPE int
#define MADDR_TYPE char*

typedef PID_TYPE	Pid; //进程Pid
//typedef PSTATE_TYPE	PState;
typedef PSTATUS_TYPE PStatus; //进程状态
typedef MADDR_TYPE MAddr; // 地址空间类型
namespace hal {

class Process {
public:
	Pid pid;   //进程ID
	PStatus pstate; //进程状态
public:
	Process();
	~Process();
	Pid create(); //创建进程
	Pid fork();    //fork()子进程
};
class Mem {
public:
	char *MemAddrBegin; //内存起始位置
	char *MemAddrEnd;   //内存结束位置

public:
	void malloc(int size); //分配一块内存
	void free(char *mem);  //释放一块内存
};
}
#endif
